Skip to content

fix: concurrent session logout not invalidating JWT in first system#411

Merged
snehar-nd merged 1 commit into
release-3.8.1from
sn/3.8.1
May 14, 2026
Merged

fix: concurrent session logout not invalidating JWT in first system#411
snehar-nd merged 1 commit into
release-3.8.1from
sn/3.8.1

Conversation

@snehar-nd
Copy link
Copy Markdown
Contributor

📋 Description

JIRA ID:

AMM-2306

✅ Type of Change

  • 🐞 Bug fix (non-breaking change which resolves an issue)

ℹ️ Additional Information

logOutUserFromConcurrentSession only cleaned up old-style Redis session keys but never added the displaced user's JWT to the denylist. Because JwtUserIdValidationFilter validates solely via JWT signature and the denylist, System 1's token remained valid and all APIs returned 200 after System 2 forced a concurrent login.

Fix: store a username→JTI mapping in Redis at login time; during concurrent-session logout, look up the JTI and add it to the denylist and evict the user_ cache so the next request from System 1 is rejected with 401 and the frontend shows the session-expiry message.

logOutUserFromConcurrentSession only cleaned up old-style Redis session
keys but never added the displaced user's JWT to the denylist. Because
JwtUserIdValidationFilter validates solely via JWT signature and the
denylist, System 1's token remained valid and all APIs returned 200
after System 2 forced a concurrent login.

Fix: store a username→JTI mapping in Redis at login time; during
concurrent-session logout, look up the JTI and add it to the denylist
and evict the user_<id> cache so the next request from System 1 is
rejected with 401 and the frontend shows the session-expiry message.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d4a7e62d-e35c-419d-8817-6b67e7bf634b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sn/3.8.1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

@snehar-nd snehar-nd merged commit 341aeff into release-3.8.1 May 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants